package com.example.spring.controller;

import com.example.spring.client.ServiceClient;
import com.example.spring.entity.ServerInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017-4-19.
 */
@RestController
public class ServiceController {

    //@Autowired
    //ServiceClient serviceClient;

    @GetMapping("/add")
    public int add(){
        return 1+3;
        //return serviceClient.add();
    }

    @RequestMapping("/getValue")
    public String getValue(){
        ServerInfo si = new ServerInfo();
        return "应用名称："+si.getAppName()+"，端口："+si.getPort();
    }
}
